<?php
	list($sql,$all_page) = splitPage("`tbl_promotion`","1 AND `status` = '1' ORDER BY `date` DESC", 20, $_GET['p']);
	$strPage = fetchPage($all_page,$_GET['p']);
	$query = mysql_query($sql);
	$tp->block('list');
	while($result = mysql_fetch_assoc($query)) {
		$content_id	= $result['content_id'];
		$title		= $result['title'];
		$thumb		= $result['thumb'] ? " <img src=\"/thumb/158/100/zc/contents/promotion/{$result['thumb']}\" />" : '';
		$tp->apply();
	}
	mysql_free_result($query);
?>